/**
 * Created by 鄢鹏权 on 2017/04/10.
 */
class System{
    /**
     * 驱动模式
     */
    static handler;
    constructor(Driver:string='Local',Config:Object={}){
        // this.handler=new System();
    }
    static log(m,...s:any[]){
        s.unshift(m);
        console.log.apply(console,s);
    }
    static alert(m:string,config:Object={}){
        alert(m)
    }
    static notify(m:string,config:Object={}){
        alert('提示:\r\n'+m);
    }
    static warning(m:string,config:Object={}){
        alert('警告:\r\n'+m);
    }
    static confirm(m:string,ok?:Function,cancel?:Function,config:Object={}){
        if(confirm('确认?:\r\n'+m)){
            if(ok instanceof Function){
                ok.apply(this,[]);
            }
        }else{
            if(cancel instanceof Function){
                cancel.apply(this,[]);
            }
        }
    }
    static success(data){
        console.log(data)
    }
}